<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../../js/vue.js"></script>
</head>
<body>
<div id="div_id1">
    <mycpn></mycpn>
</div>
<div id="div_id2">
    <mycpn2></mycpn2>
</div>
<script>
    const cpnC=Vue.extend({
        template:`
            <div>
                <h2>我是标题</h2>
            </div>`
    })
    const app1=new Vue({
        el:"#div_id1",
        //局部组件
        components:{
            mycpn:cpnC
        }
    })
</script>
</body>
</html>